
#include "raw_socket.h"

namespace sock {
	struct RawSocket::Impl {
		SOCKET sock;
		bool connected_flag;

		Impl()
		{
			sock = INVALID_SOCKET;
			connected_flag = false;
		}
		void create()
		{
			sock = (int) ::socket( AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP );
			if( sock == INVALID_SOCKET ){
				throw SocketError( WSAGetLastError() );
			}
		}
	};

}